<?php
class CargarHelper extends AppHelper 
{
	var $helpers = array('Html', 'Javascript', 'Form','Ajax','Session');
	var $Html = null;
	var $Javascript = null;
	var $Ajax = null;

function linkmenu($title1,$title2, $url_cargar, $id_cargar,$buscador)
{
	if(!isset($buscador))$buscador='#';
     	$return="<a href=\"#".$title1."\" onClick=\"confirmarl('$url_cargar','$id_cargar','No'), campobuscador('$buscador') \">".$title2."</a>";
     	return $return;
}


function linkng($css,$title1,$title2, $url_cargar, $id_cargar,$pre=null)
{
    if(isset($title1) && isset($title2) && isset($url_cargar) && isset($id_cargar))
    {
		if($pre==null)
		{
	    	$return="<a href=\"#".$title1."\" onClick=\"confirmarl('$url_cargar','$id_cargar','No');\" id='".$css."'>".$title2."</a>";
        }
		else
		{
	    	$return="<a  href=\"#".$title1."\" onClick=\"confirmarl('$url_cargar','$id_cargar','$pre');\" id='".$css."'>".$title2."</a>";
        }
    }
    else
    {
		$return="";
    }
    return $return;
}


function link($title1,$title2, $url_cargar, $id_cargar,$pre=null)
{
    if(isset($title1) && isset($title2) && isset($url_cargar) && isset($id_cargar))
    {
		if($pre==null)
		{
	    	$return="<a href=\"#".$title1."\" onClick=\"confirmarl('$url_cargar','$id_cargar','No');\" style='text-decoration:none; color: #000000;'>".$title2."</a>";
        }
		else
		{
	    	$return="<a  href=\"#".$title1."\" onClick=\"confirmarl('$url_cargar','$id_cargar','$pre');\" style='text-decoration:none; color: #000000;'>".$title2."</a>";
        }
    }
    else
    {
		$return="";
    }
    return $return;
}
/*
	function AbrirMarco_1 ($titulo)
	{
		if(!isset($titulo) || empty($titulo)){$titulo="&nbsp;";}
		return '<fieldset style="width:95%; -moz-border-radius:10px; border: 1px #990000 solid; background-color: #FFFFFF;">
<legend align="center" style="font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 0.8em;"><b>'.$titulo.'</b></legend>';
	}
	function CerrarMarco ()
	{
       return '</fieldset>';
	}
	function AbrirMarco_2 ($titulo)
	{
		if(!isset($titulo) || empty($titulo)){$titulo="&nbsp;";}
		return '<fieldset style="width:90%; -moz-border-radius:10px; border: 1px #000066 solid;" id="comentarios">
<legend><b>'.$titulo.'</b></legend>';
	}
*/

	function font_1 ($titulo,$titulo2)
	{
		if(!isset($titulo) || empty($titulo)){$titulo="&nbsp;";}
		return '<font title="'.$titulo.' '.$titulo2.'" style="font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 0.8em;"><b>'.$titulo.'</b> '.$titulo2.'</font>';
	}
	function font_2 ($titulo)
	{
		if(!isset($titulo) || empty($titulo)){$titulo="&nbsp;";}
		return '<font title="'.$titulo.'" style="font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 0.8em;"><b>'.$titulo.'</b> </font>';
	}
	function font_3 ($titulo)
	{
		if(!isset($titulo) || empty($titulo)){$titulo="&nbsp;";}
		return '<font title="'.$titulo.'" style="font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 0.7em; text-align:justify;">'.$titulo.'</font>';
	}





	function input($title, $href = null, $options = array(), $confirm = null, $escapeTitle = true)
	{
		if (!isset($href)) {
			$href = $title;
		}
		if (!isset($options['url'])) {
			$options['url'] = $href;
		}
        $options ['div']=false;
        $options ['label']=false;
        $options ['type']='change';
        $options ['error']=false;
		if (isset($confirm)) {
			$options['confirm'] = $confirm;
			unset($confirm);
		}
		$htmlOptions = $this->Ajax->__gesisgemOptions($options, array('url'));

		if (empty($options['fallback']) || !isset($options['fallback'])) {
			$options['fallback'] = $href;
		}
		$htmlDefaults = array('id' => 'link' . intval(mt_rand()), 'onchange' => '');
		$htmlOptions = array_merge($htmlDefaults, $htmlOptions);

		$htmlOptions['onchange'] .= ' event.returnValue = false; return false;';
		$return = $this->Form->input($title,$htmlOptions);
		$callback = $this->Ajax->remoteFunction($options);
		$script = $this->Javascript->event("'{$htmlOptions['id']}'", "change", $callback);

		if (is_string($script)) {
			$return .= $script;
		}
		return $return;
	}


function extension ($v)
{
	$ext = array(
		'image/jpeg'=>'jpg',
		'image/png'=>'png',
		'image/gif'=>'gif',
		'image/bmp'=>'bmp',
		'application/zip'=>'zip',
		'application/vnd.ms-powerpoint'=>'pps',
		'application/vnd.ms-excel'=>'xls',
		'application/msword'=>'doc',
		'application/rar'=>'rar',
		'application/pdf'=>'pdf',
		'application/octet-stream'=>'flv',
		'text/x-sql'=>'sql',
		'text/plain'=>'sql',
	);
	return $ext[$v];
}


///////////////////////////BOTONERA LOGOS DESARROLLO////////////////////////////////////////
/*
function botonera() { $return = "<div align='center'><table><tr><td>
<a href='http://www.mozilla-europe.org/es/firefox/' target='_blank'><img src='img/imagenes/desarrollo/firefox.png' border='0'></a>
<a href='http://cakephp.org/' target='_blank'><img src='img/imagenes/desarrollo/cakepower.png' border='0'></a>
<a href='http://www.w3.org/Style/CSS/' target='_blank'><img src='img/imagenes/desarrollo/css-power.png' border='0'></a>
<a href='http://www.postgresql.org/' target='_blank'><img src='img/imagenes/desarrollo/mysql.png' border='0'></a>
<a href='http://www.debian.org/index.es.html' target='_blank'><img src='img/imagenes/desarrollo/debian.png' border='0'></a>
</td></tr></table></div>"; return $return; }
*/
/*
function initable($nombre) {
//echo '<EMBED src="http://localhost/sonido/offline.wav" width=0 height=0 LOOP="FALSE" AUTOSTART="TRUE">';	
	$dispac["ini1"]["estylos_vinotinto"]="<table border='0' width='95%' height='auto' style='margin:0px; padding:0px;' cellpadding='0' cellspacing='0'>
<tr border='0' style='margin:0px; padding:0px;'>
  <td width='191px' height='54' border='0' align='right' ><img src='img/imagenes/tabla/vinotinto/t1a.png'></td><td width='auto' height='54' style='background-image:url(../img/imagenes/tabla/vinotinto/t1b.png); background-repeat:repeat-x; azimuth:right;'><div id='ctab'>";
  
$dispac["ini2"]["estylos_vinotinto"]="</div></td><td width='195px' height='54' border='0' align='left' style='margin:0px; padding:0px;'><img src='img/imagenes/tabla/vinotinto/t1c.png'></td></tr></table><div id='cuerptab'><table border='0' width='95%' height='auto' style='margin:0px; padding:0px;' cellpadding='0' cellspacing='0'><tr border='0' style='margin:0px; padding:0px;'>
  <td width='14' height='auto' border='0' style='background-image:url(../img/imagenes/tabla/vinotinto/t2a.png); background-repeat:repeat-y; azimuth:right;'>&nbsp;</td><td width='auto' style='background-image:url(../img/imagenes/tabla/vinotinto/t2b.png); background-repeat:repeat;'  align='center'>";



$dispac["ini1"]["estylos_azuloscuro"]="<table border='0' width='100%' height='auto' style='margin:0px; padding:0px;' cellpadding='0' cellspacing='0'>
<tr border='0' style='margin:0px; padding:0px;'>
  <td width='191px' height='54' border='0' align='right' style='margin:0px; padding:0px;'><img src='img/imagenes/tabla/azul/t1a.png'></td><td width='auto' height='54' style='background-image:url(../img/imagenes/tabla/azul/t1b.png); background-repeat:repeat-x; azimuth:right;'><div id='ctab'>";
$dispac["ini2"]["estylos_azuloscuro"]="</div></td><td width='195px' height='54' border='0' align='left' style='margin:0px; padding:0px;'><img src='img/imagenes/tabla/azul/t1c.png'></td></tr></table><div id='cuerptab'><table border='0' width='100%' height='auto' style='margin:0px; padding:0px;' cellpadding='0' cellspacing='0'><tr border='0' style='margin:0px; padding:0px;'>
  <td width='14' height='auto' border='0' style='background-image:url(../img/imagenes/tabla/azul/t2a.png); background-repeat:repeat-y; azimuth:right;'>&nbsp;</td><td width='auto' style='background-image:url(../img/imagenes/tabla/azul/t2b.png); background-repeat:repeat;'  align='center'>";

	$nombre_css=$this->Session->read('tema')!=''?$this->Session->read('tema'):'estylos_vinotinto';
	$color1= $dispac['ini1'][$nombre_css];
	$color2= $dispac['ini2'][$nombre_css];

	$return = $color1.$nombre.$color2; echo $return;	}

*/
/*
function fintable() {

//FIN//
$dispac["fin"]["estylos_vinotinto"]="</td> <td width='14' height='auto' border='0' style='background-image:url(../img/imagenes/tabla/vinotinto/t2c.png); background-repeat:repeat-y; azimuth:right;'>&nbsp;</td></tr></table></div><div id='fintable'><table border='0' width='95%' height='auto' style='margin:0px; padding:0px;' cellpadding='0' cellspacing='0'><tr border='0' style='margin:0px; padding:0px;'><td width='191px' height='56' border='0' align='right' style='margin:0px; padding:0px;'><img src='img/imagenes/tabla/vinotinto/t3a.png'></td><td width='auto' height='56' style='background-image:url(../img/imagenes/tabla/vinotinto/t3b.png); background-repeat:repeat-x; azimuth:right;'>&nbsp;</td><td width='195px' height='56' border='0' align='left' style='margin:0px; padding:0px;'><img src='img/imagenes/tabla/vinotinto/t3c.png'></td></tr></table></div>";


$dispac["fin"]["estylos_azuloscuro"]="</td> <td width='14' height='auto' border='0' style='background-image:url(../img/imagenes/tabla/azul/t2c.png); background-repeat:repeat-y; azimuth:right;'>&nbsp;</td></tr></table></div><div id='fintable'><table border='0' width='100%' height='auto' style='margin:0px; padding:0px;' cellpadding='0' cellspacing='0'><tr border='0' style='margin:0px; padding:0px;'><td width='191px' height='56' border='0' align='right' style='margin:0px; padding:0px;'><img src='img/imagenes/tabla/azul/t3a.png'></td><td width='auto' height='56' style='background-image:url(../img/imagenes/tabla/azul/t3b.png); background-repeat:repeat-x; azimuth:right;'>&nbsp;</td><td width='195px' height='56' border='0' align='left' style='margin:0px; padding:0px;'><img src='img/imagenes/tabla/azul/t3c.png'></td></tr></table></div>";

$nombre_css=$this->Session->read('tema')!=''?$this->Session->read('tema'):'estylos_vinotinto';
$color= $dispac['fin'][$nombre_css];
 $return = $color; echo $return; }
*/

function hora($fecha) { $return = "<th width='90%' align='left'><div style='color:#ffffff;'>&nbsp;&nbsp;$fecha</div></th>"; return $return; }
function cargando() { 

echo "<script type=\"text/javascript\" language=\"javascript\">
				
				    document.getElementById('carg').style.display='none';
                 </script>";
			echo "<script type=\"text/javascript\" language=\"javascript\">
				
				    document.getElementById('carg').style.display='block';
                 </script>";
 }

	function ver_fecha($f=null)
	{
		return substr($f,8,2)."-".substr($f,5,2)."-".substr($f,0,4);
	}
	function miles($numero)
	{
		return number_format($numero,2,',','.');
	}

///////////////////////////////////// /////////////////////////////////////
/*
function mca ($titulo=null)
	{
		if(!isset($titulo) || empty($titulo)){$titulo="&nbsp;";}
		if($titulo=='cerrar')
		{ 
		$retur='</table></fieldset>';
		}
		else
		{
		$retur='<fieldset style="width:90%; -moz-border-radius:10px; border: 1px #990000 solid; background-color:#FFFFFF;">
<legend align="center" style="font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 0.8em;">'.$titulo.'</legend>

<table border="0" width="98%" cellpadding="0" cellspacing="0" align="center">';
		}

		return $retur;
	}
*/
/*
function mcb ($titulo=null)
	{
		if($titulo=='cerrar')
		{ 
		$retur='</td></tr></table></fieldset>';
		}
		else
		{
		$retur='<fieldset class="marco90" id="comentarios">
	<legend><b>'.$titulo.'</b></legend>
	<table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0" align="center">
  	<tr><td>';
		}
		return $retur;
	}
*/
/*
function td ($titulo=null, $tamanio=null, $posicion=null, $id=null, $tipo=null)
	{
	if(!isset($titulo) || empty($titulo)){$titulo="&nbsp;";}else{$titulo=$titulo;}
	if(!isset($tamanio) || empty($tamanio)){$tamanio="";}else{$tamanio="width='$tamanio'";}
	if(!isset($posicion) || empty($posicion)){$posicion="";}else{$posicion="align='$posicion'";}
	if(!isset($id) || empty($id)){$id="";}else{$id="id='$id'";}
	if(!isset($tipo) || empty($tipo)){$tipo="d";}else{$tipo=$tipo;}

		return	"<t$tipo $tamanio $id $posicion>$titulo</t$tipo>";
	}
*/
/*
function tr ($posicion=null)
	{
		if($posicion=='cerrar')
		$posicion='</tr>';
		else
		{
		if(!isset($posicion) || empty($posicion)){$posicion="<tr>";}else{$posicion="<tr align='$posicion'>";}
		}	
		return $posicion;

	}
*/
/*
function inicio ()
	{
		return '<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center">';
	}
function fin ()
	{
		return '</table>';
	}
function table ($border=null)
	{
		if(!isset($border) || empty($border)){$border=0;}
		return "<table border='$border' cellpadding='0' cellspacing='5' width='100%'>";
	}
*/
///////////////////////////////////// LO NUEVO PARA AGROPATRIA ///////////////////////////

	function tabla ($border=null, $cellspacing=null, $align=null)
	{
		if(!isset($cellspacing) and !isset($align) and !isset($border)){$ban1=0;}else {$ban1=1;}
		if(!isset($border) || empty($border)){$border=0;$ban1=1;}
		if(!isset($cellspacing) || empty($cellspacing)){$cellspacing=0;$ban1=1;}
		if(!isset($align) || empty($align)){$align='center';$ban1=1;}
		if($ban1==1)
		return "<table border='$border' cellpadding='0' cellspacing='$cellspacing' width='100%' align='$align'>";
		else
		return "</table>";
	}
	function marcorojo ($titulo=null)
	{
		if(!isset($titulo) || empty($titulo)){$titulo="cerrar";}
		if($titulo=='cerrar')
		$retur='</fieldset>';
		else
		{
		$retur='<fieldset style="width:90%; -moz-border-radius:10px; border: 1px #990000 solid; background-color:#FFFFFF;">
<legend align="center" style="font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 0.8em;">'.$titulo.'</legend>';
		}
		return $retur;
	}
	function marcoazul ($titulo=null)
	{
		if(!isset($titulo) || empty($titulo)){$titulo="cerrar";}
		if($titulo=='cerrar')
		$retur='</fieldset>';
		else
		$retur='<fieldset id="comentarios" style="width:97%; -moz-border-radius:10px; border: 1px #000066 solid;"><legend><b>'.$titulo.'</b></legend>';
		return $retur;
	}

	function hoja ($align=null)
	{
		if(!isset($align) || empty($align)){$ban=0;}else {$ban=1;}
		if($ban==1)
		return "<table border='0' cellpadding='0' cellspacing='0' width='100%' align='center'><tr><td align='$align'>";
		else
		return "</td></tr></table>";
	}
	function cerrar ($accion=null)
	{
		if($accion==0)
		$retuu='<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center"><tr><td></td><td align="right" width="10px">';
		else
		$retuu='</td></tr></table>';
		return $retuu;
	}
	function msj_error ($msj)
	{
		if(!isset($msj) || empty($msj)){$msj="&nbsp;";}
		$return= '<script type="text/javascript" language="javascript">	
		// <![CDATA[
						mensajeError("'.$msj.'");
					
					// ]]>
				  </script>';
	/*echo'<script type="text/javascript" language="javascript"> // <![CDATA[// new Effect.Opacity("cuerpo_chat", {duration:1.0, from:1.0, to:0.2})  // ]]>
	 </script>';
	*/
	//echo '<EMBED src="/sonido/newmessage.wav" width=0 height=0 LOOP="FALSE" AUTOSTART="TRUE">';

		return $return;
	}
	function msj_exito ($msj) 
	{
		if(!isset($msj) || empty($msj)){$msj="&nbsp;";}
		$return= '<script type="text/javascript" language="javascript">
		// <![CDATA[
						mensajeExito("'.$msj.'");
					// ]]>
				 </script>';
		return $return;
	}

	function acciones($ac1=null, $ac2=null ,$ac3=null, $ac4=null, $ac5=null, $ac6=null, $ac7=null, $ac8=null, $ac9=null)
	{
		$return= '<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center"><tr>';
		$return.= "<td></td>";
		if(isset($ac1)){$return.= "<td width='20px'>$ac1</td>";}
		if(isset($ac2)){$return.= "<td width='20px'>$ac2</td>";}
		if(isset($ac3)){$return.= "<td width='20px'>$ac3</td>";}
		if(isset($ac4)){$return.= "<td width='20px'>$ac4</td>";}
		if(isset($ac5)){$return.= "<td width='20px'>$ac5</td>";}
		if(isset($ac6)){$return.= "<td width='20px'>$ac6</td>";}
		if(isset($ac7)){$return.= "<td width='20px'>$ac7</td>";}
		if(isset($ac8)){$return.= "<td width='20px'>$ac8</td>";}
		if(isset($ac9)){$return.= "<td width='20px'>$ac9</td>";}
		
		$return.= "<td></td>";
		
		
		$return.='</tr></table>';
		return $return;
	
		//if(!isset($titulo) || empty($titulo)){$titulo="&nbsp;";}
		//return '<font title="'.$titulo.'" style="font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 0.7em; text-align:justify;">'.$titulo.'</font>';
	}

function boton ($texto,$tipo,$tamw=null,$border=null)
	{
    $img = 'nav_logo27.png';
    
	if($tipo=='atras')
		{$with1='13';$heigt1='4';$with2='13';$heigt2='-19';}
	else if($tipo=='adelante')
		{$with1='-23';$heigt1='4';$with2='-23';$heigt2='-19';}
	else if($tipo=='inicio')
		{$with1='-68';$heigt1='4';$with2='-68';$heigt2='-19';}
	else if($tipo=='fin')
		{$with1='-110';$heigt1='4';$with2='-110';$heigt2='-19';}
	else
		{$with1='0';$heigt1='213';$with2='0';$heigt2='213';}
	
	if($border=='si')
		$estilobord='border-width: 1px; border-style: dashed; border-color: red;';
	else
		$estilobord='/*text-decoration:blink;*/';
	
	
	$tamh='25px';
       return ' 
	   <STYLE id=gstyle>
	   .'.$tipo.'{
cursor:pointer;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top;text-decoration:none; background:#eee;border:solid 1px;
border-color:#ccc #999 #999 #ccc;width:'.$tamw.'; height:'.$tamh.';line-height:'.$tamh.';vertical-align:text-bottom;-moz-border-radius: 8px; -webkit-border-radius: 8px;text-shadow: 0 0 0.2em #999999;text-decoration:none; color: #000000;
background:url(../img/'.$img.') '.$with1.'px '.$heigt1.'px  no-repeat,url(../img/'.$img.') bottom;

}
#'.$tipo.':hover{ background:url(../img/'.$img.') '.$with2.'px '.$heigt2.'px  no-repeat,url(../img/'.$img.') 0px -439px;text-decoration:none; color: #000000;
'.$estilobord.'
text-shadow: 0 0 0.2em #990000, 0 0 0.2em #ffffff,0 0 0.2em #ffffff;
}</STYLE> <table border="0" cellpadding="0" cellspacing="0"><tr><td>
	   <div id="'.$tipo.'" align="center" class="'.$tipo.'" style="width:'.$tamw.';">'.$texto.'</div>
	   </td></tr></table> 
';
	}

function botones ($tipo,$border)
	{

$img = 'nav_logo27.png';
	if($tipo=='activar')
		{$with1='3';$heigt1='-49';$with2='-26';$heigt2='-49';}
	else if($tipo=='inactivar')
		{$with1='-56';$heigt1='-49';$with2='-87';$heigt2='-49';}
	else if($tipo=='pdf')
		{$with1='3';$heigt1='-80';$with2='-29';$heigt2='-80';}
	else if($tipo=='editar')
		{$with1='-59';$heigt1='-80';$with2='-89';$heigt2='-80';}
	else if($tipo=='cuenta')
		{$with1='-119';$heigt1='-80';$with2='-150';$heigt2='-80';}
	else if($tipo=='candado')
		{$with1='4';$heigt1='-111';$with2='-24';$heigt2='-111';}
	else if($tipo=='status_p')
		{$with1='-58';$heigt1='-111';$with2='-87';$heigt2='-111';}
	else if($tipo=='status_n')
		{$with1='-119';$heigt1='-111';$with2='-148';$heigt2='-111';}
	else if($tipo=='cerrar')
		{$with1='2';$heigt1='-144';$with2='-30';$heigt2='-144';}
	else if($tipo=='inicio')
		{$with1='2';$heigt1='-174';$with2='-28';$heigt2='-174';}
	else if($tipo=='sms')
		{$with1='-59';$heigt1='-144';$with2='-89';$heigt2='-144';}
	else if($tipo=='ayuda')
		{$with1='-120';$heigt1='-143';$with2='-150';$heigt2='-143';}	

	else if($tipo=='carpeta')
		{$with1='-59';$heigt1='-174';$with2='-90';$heigt2='-174';}
	else if($tipo=='firefox')
		{$with1='1';$heigt1='1';$with2='1';$heigt2='1';}
	else
		{$with1='-118';$heigt1='-49';$with2='-148';$heigt2='-49';}
	
	if($border=='si')
		$estilobord='border-width: 1px; border-style: dashed; border-color: red;';
	else
		$estilobord='/*text-decoration:blink;*/';
	
	$tamw='30px';
	$tamh='25px';
	$texto='';


//echo '<br />with1='.$with1.'<br />heigt1='.$heigt1.'<br />with2='.$with2.'<br />heigt2='.$heigt2;

	 /* #disp{display:block;position:fixed;margin:0;outline:0;font:0.0em arial,sans-serif;vertical-align:top;text-decoration:none; width:150px; height:30px;line-height:30px;vertical-align:text-bottom;-moz-border-radius: 8px; -webkit-border-radius: 8px;text-shadow: 0 0 0.2em #999999;text-decoration:none; color: #000000;}
	   
	   #disp:hover{display:block;position:absolute;cursor:pointer;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top;text-decoration:none; background:#eee;width:150px; height:30px;line-height:30px;vertical-align:text-bottom;-moz-border-radius: 8px; -webkit-border-radius: 8px;text-shadow: 0 0 0.2em #999999;text-decoration:none; color: #000000;	   }*/
	 /* <div id="disp" align="center">'.$ayuda.'</div>*/
       return ' 
	   <STYLE id=gstyle>
	   
	 
	   .'.$tipo.'{
cursor:pointer;margin:0;outline:0;font:10px arial,sans-serif;vertical-align:top;text-decoration:none; background:#eee;border:solid 0px;

border-color:#ccc #999 #999 #ccc;width:'.$tamw.'; height:'.$tamh.';line-height:'.$tamh.';vertical-align:text-bottom;-moz-border-radius: 8px; -webkit-border-radius: 8px;text-shadow: 0 0 0.2em #999999;text-decoration:none; color: #000000;
background:url(../img/'.$img.') '.$with1.'px '.$heigt1.'px  no-repeat;
}
#'.$tipo.':hover{ background:url(../img/'.$img.') '.$with2.'px '.$heigt2.'px  no-repeat; color: #000000;
'.$estilobord.'
text-shadow: 0 0 0.2em #990000, 0 0 0.2em #ffffff,0 0 0.2em #ffffff;
}</STYLE> 

	   <div id="'.$tipo.'" align="center" class="'.$tipo.'" style="width:'.$tamw.';">'.$texto.'</div>
	   
	  
 
';
	}
function mayuscula($t) // lista
	{
		return trim(addslashes(strtr(strtoupper($t),"àèìòùáéíóúçñäëïöü","ÀÈÌÒÙÁÉÍÓÚÇÑÄËÏÖÜ")));
	}
/*
function numero()
{
$return= '\'onkeyup\'=>\'var no_digito = /\D/g; this.value = this.value.replace(no_digito , \'\');\'';
return $return;
}
*/

}
?>
